package com.SpringMVC.config;

import org.springframework.context.annotation.Bean;
import org.springframework.web.servlet.ViewResolver;
import org.springframework.web.servlet.view.InternalResourceViewResolver;

/**
 * Created by 41579 on 2017/5/23.
 */
public class CommonConfig {
    @Bean
    public ViewResolver viewResolver() {
        InternalResourceViewResolver internalResourceViewResolver = new InternalResourceViewResolver();
        internalResourceViewResolver.setSuffix(".jsp");
        internalResourceViewResolver.setPrefix("/WEB-INF/");
        internalResourceViewResolver.setViewClass(org.springframework.web.servlet.view.JstlView.class);
        return internalResourceViewResolver;
    }
}
